fix: Preload point cloud component metadata in reader#94
Merged
janickm merged 1 commit intoNVIDIA:mainfrom May 7, 2026
Merged
Conversation
Avoid runtime re-reads if possible
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Avoid runtime re-reads if possible
This pull request refactors the initialization and property access patterns in the
PointCloudsComponentclass to improve efficiency and code clarity. The main change is the introduction of an explicit__init__method that caches frequently accessed attributes, reducing repeated reads from the underlying data group.Refactoring and performance improvements:
__init__method to the class to cachepc_timestamps_us,coordinate_unit, andattribute_schemasas instance variables, reducing repeated access to the underlyingzarr.Groupand improving performance.coordinate_unit,pcs_count,pc_timestamps_us, andattribute_namesproperties to return values from the cached instance variables instead of reading from the group each time.get_attribute_schemamethod to use the cached_attribute_schemasdictionary, ensuring consistent and efficient schema access.